import React from 'react'
//渲染列表
function ListItem({ children }) {
//   children()
//   return <div>ListItem,{children}</div>
return <div>ListItem,{children.map(child=>child)}</div>
}

//数据提供者 渲染ListItem组件 App-ListItem
class App extends React.Component {
  render() {
    return (
      <div>
        <ListItem>
          {/* <div>this is child</div> */}
          {/* {() => console.log(123)} */}
          {/* {
              <div>
                  <p>this is p</p>
              </div>
          } */}
          
              <div>1111</div>
              <p>2222</p>
          
        </ListItem>
      </div>
    )
  }
}

export default App
